<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<table width="100%">
	<tbody>
		<tr>
			<td height="30" class="sectionheading bottom-border">
				Announcements Manager
			</td>
		</tr>
		<tr>
        	<td height="8"></td>
        </tr>
        <tr>
        	<td align="right" height="30">
				<s:a href="showNewAnnouncement.htm" cssClass="navi-link"> New Announcement </s:a>
			</td>
		</tr>
		<tr>
			<td>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="Textfiled-border">
                	<tr>
						<td height="30" width="5%" align="center" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
							#
						</td>
						<td align="center" width="15%" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
							<s:text name="label.system.Date" />
						</td>
						<td align="center" width="25%" bgcolor="#E9E9E9"
							class="right-border verdana12darkgreybold">
							<s:text name="label.system.Subject" />
						</td>
						<td align="center" width="20%" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
							<s:text name="label.system.Name" />
						</td>
						<td align="center" width="20%" bgcolor="#E9E9E9" class="right-border verdana12darkgreybold">
							<s:text name="label.system.Email" />
						</td>
						<td align="center" width="15%" bgcolor="#E9E9E9" class="verdana12darkgreybold">
							<s:text name="label.system.Actions" />
						</td>
					</tr>

					<s:iterator value="announcementList" var="testList" status="rowstatus">
						<s:set name="bgColor" value="%{'#FFFFFF'}" var="bgColor"></s:set>

						<s:if test="#rowstatus.even">
							<s:set var="bgColor" value="%{'#F8F8F8'}"></s:set>
						</s:if>

						<tr>
							<td height="23" align="center" bgcolor="<s:property value="%{bgColor}" />"
								class="right-border verdana12darkgreybold">
								<s:property value="id" />
							</td>
							<td align="center" bgcolor="<s:property value="%{bgColor}" />"
								class="right-border verdana11greynormal">
								<s:date name="date" format="dd/MM/yyyy hh:mm" />
							</td>
							<td align="center" bgcolor="<s:property value="%{bgColor}" />"
								class="right-border verdana11greynormal">
								<s:property value="subject" />
							</td>
							<td align="center" bgcolor="<s:property value="%{bgColor}" />"
								class="right-border verdana11greynormal">
								<s:property value="name" />
							</td>
							<td align="center" bgcolor="<s:property value="%{bgColor}" />"
								class="right-border verdana11greynormal">
								<a href="mailto:<s:property value="email" />" class="verdana11greynormal"><s:property value="email" /> </a>
							</td>
							<td align="center" bgcolor="<s:property value="%{bgColor}" />"
								class="verdana11greynormal">
								<s:url action="showNewAnnouncement" namespace="/admin" var="edit">
									<s:param name="announcement.id" value="id"></s:param>
								</s:url>

								<s:url action="copyNewAnnouncement" namespace="/admin" var="copy">
									<s:param name="announcement.id" value="id"></s:param>
								</s:url>

								<s:url action="deleteNewAnnouncement" namespace="/admin"
									var="delete">
									<s:param name="announcement.id" value="id"></s:param>
								</s:url>

								<s:a href="%{edit}" cssClass="verdana11greynormal">Edit</s:a>
								<s:a href="#" cssClass="verdana11greynormal">Delete</s:a>
								<s:a href="#" cssClass="verdana11greynormal">Copy</s:a>
							</td>
						</tr>
					</s:iterator>
				</table>
			</td>
		</tr>
	</tbody>
</table>